package com.gzpi.hwgggh.controller;

import com.gzpi.hwgggh.service.DictionaryService;
import com.gzpi.hwgggh.utils.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @date : 2021-01-04 19:20
 **/
@RequestMapping("dic")
@RestController
@CrossOrigin
public class DictionaryController {


    @Autowired
    private DictionaryService dictionaryService;

    /**
     * 获取下拉框信息
     * @param key
     * @param groupkey
     * @return
     */
    @RequestMapping(value = "/selectDicByKeyAndGroupKey.do",method = RequestMethod.POST)
    public Result selectDicByKeyAndGroupKey(String key,String groupkey){
        return dictionaryService.selectDicByKeyAndGroupKey(key,groupkey);
    }

    @RequestMapping("/removeCache.do")
    public Result removeCache(){
        return dictionaryService.removeCache();
    }

}
